import java.sql.Date;

abstract class Event {
	
	private Date date;
	private String location;
	private int duration;
	
	public Event(Date date, String location, int duration){
		
		this.date=date;
		this.location=location;
		this.duration=duration;
		
	}
	
	public boolean checkEvent(Date startDate, Date endDate){
		if(startDate.before(date)){
			if((endDate==null)||(endDate.after(date))){
				return true;
			}
		}
		return false;
	}
	public String toString(){
		return location+" am "+date.toString()+" Dauer:"+duration;
	}
	public abstract double getCost();
	
}
